package com.lovo.system.service.impl;

import com.lovo.system.dto.count.SaleMonthDto;
import com.lovo.system.dto.count.SaleTypeDto;
import com.lovo.system.mapper.SaleStatisticMapper;
import com.lovo.system.service.ISaleStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SaleStatisticServiceImpl implements ISaleStatisticsService {

    @Autowired
    SaleStatisticMapper saleStatisticMapper;

    @Override
    public List<SaleTypeDto> selectType(String startTime,String endTime) {
        return saleStatisticMapper.selectType(startTime,endTime);
    }

    @Override
    public List<SaleTypeDto> selectBrand(String startTime,String endTime) {
        return saleStatisticMapper.selectBrand(startTime,endTime);
    }

    public List<SaleTypeDto> selectMonth(String year){
        return saleStatisticMapper.selectMonth(year);
    }
}
